<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Axios1</title>
    <script src="./资料/axios-0.18.0.js"></script>
</head>
<body>
    <!-- <input type="button" value="获取数据GET" onclick="getRequest()"> -->
    <input type="button" value="删除数据POST" onclick="postRequest()">
    <div id="app">
    </div>
</body>
<script>
    function getRequest(){
        //get请求
    axios({
        method:"get",
        url:"https://mock.apifox.cn/m1/3128855-0-default/emp/list"
    }).then((result)=>{
        console.log(result.data);
    })
    }
    function postRequest(){
        //post请求
    axios({
        method:"post",
        url:"https://mock.apifox.cn/m1/3128855-0-default/emp/deleteById",
        data:"id=1"
    }).then((result)=>{
        console.log(result.data);
    })
    }
</script>

</html>